﻿using System.Windows;
using Creventive.Wpf.ShellFactory.Modules;

namespace $rootnamespace$
{
    /// <summary>
    /// Adds additional properties to the master ViewSources.
    /// </summary>
    public class $safeitemname$
    {
        public static readonly DependencyProperty ExtensionProperty = DependencyProperty.RegisterAttached("Extension", typeof($safeitemname$), typeof($safeitemname$), new UIPropertyMetadata(null));

        /// <summary>
        /// Gets an extension for the given module, if available.
        /// </summary>
        /// <param name="module">The module.</param>
        /// <returns></returns>
        public static $safeitemname$ GetExtension(ApplicationModule module)
        {
            return ($safeitemname$)module.GetValue(ExtensionProperty);
        }

        /// <summary>
        /// Sets an extension on the given module, if available. Must be called before the shell is loaded.
        /// </summary>
        /// <param name="module">The module.</param>
        /// <param name="value">The value.</param>
        public static void SetExtension(ApplicationModule module, $safeitemname$ value)
        {
            module.SetValue(ExtensionProperty, value);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="$safeitemname$"/> class.
        /// </summary>
        public $safeitemname$()
        { 
            // TODO: Initialize instance
        }

        // TODO: Add extensibility properties    
    }
}